package com.ssy.lingxi.report.repository.report;

import com.ssy.lingxi.report.entity.report.DataLayoutDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 数据布局
 * @author 伍将
 * @date 2020/11/19
 * @version 2.0.0
 */
public interface DataLayoutRepository extends JpaRepository<DataLayoutDO, Long>, JpaSpecificationExecutor<DataLayoutDO> {

    /**
     * 根据会员id、角色id查询数据布局
     * @param memberId
     * @param roleId
     * @return
     */
    List<DataLayoutDO> findByMemberIdAndRoleIdAndUserId(Long memberId, Long roleId,Long userId);

    /**
     * 根据会员id、角色id删除数据布局
     * @param memberId
     * @param roleId
     */
    void deleteByMemberIdAndRoleId(Long memberId, Long roleId);

    void deleteByIdInAndUserId(List<Long> idList,Long userId);
}

